package com.market.mapper;

import com.market.common.request.PurchaseRequestParams;
import com.market.common.vo.CommodityVo;
import com.market.common.vo.PurchaseVo;
import com.market.entity.Commodity;
import com.market.entity.Purchase;
import com.market.entity.Worker;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface PurchaseMapper {
    /**
     * 增加采购
     *
     * @param purchase
     * @return
     */
    int insert(@Param("purchase") Purchase purchase);

    /**
     * 审核采购信息
     *
     * @return
     */
    List<PurchaseVo> selects();

    /**
     * 根据ID查询审核状态
     */
    Purchase selectAuditStatus(@Param("purchaseId") Long purchaseId);

    /**
     * 删除
     *
     * @param purchaseId
     * @return
     */
    int delect(@Param("purchaseId") Long purchaseId);

    /**
     * 修改
     *
     * @param purchase
     * @return
     */
    int update(@Param("purchase") Purchase purchase);

    /**
     * 审核通过的采购单
     *
     * @return
     */
    List<PurchaseVo> selectsPass();

    /**
     * 根据ID查询入库状态
     */
    Purchase selectInStatus(@Param("purchaseId") Long purchaseId);


    /**
     * 高级搜索
     */
    List<PurchaseVo> selectPurchases(@Param("purchase")Purchase purchase);
    /**
     * 查询所有采购单
     *
     * @param purchase
     * @return
     */
/*    List<PurchaseVo> selectPurchases(@Param("purchase") Purchase purchase);*/

}
